Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trie: remove isTruthy and isFalsy #2249

Merged
merged 2 commits into from
Aug 30, 2022
Merged

Conversation

gabrocheleau
Copy link
Contributor

Extracts the trie package from #2233

@codecov
Copy link

codecov bot commented Aug 30, 2022

Codecov Report

Merging #2249 (089295e) into master (2d60261) will increase coverage by 0.00%.
The diff coverage is 69.23%.

Impacted file tree graph

Flag Coverage Δ
block 92.77% <ø> (ø)
blockchain 88.39% <ø> (ø)
client 87.07% <ø> (ø)
common 98.09% <ø> (ø)
devp2p 92.30% <ø> (+0.05%) ⬆️
ethash ∅ <ø> (∅)
evm 79.11% <ø> (ø)
rlp ∅ <ø> (∅)
statemanager 88.16% <ø> (ø)
trie 89.43% <69.23%> (ø)
tx 97.98% <ø> (ø)
util 92.33% <ø> (ø)
vm 85.27% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

jochem-brouwer
jochem-brouwer previously approved these changes Aug 30, 2022
Copy link
Member

@jochem-brouwer jochem-brouwer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gabrocheleau
Copy link
Contributor Author

LGTM!

Thanks for the approval! I just made a minor update here: 089295e

based on the discussion here: #2233 (comment)

Copy link
Contributor

@acolytec3 acolytec3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gabrocheleau gabrocheleau merged commit f06b921 into master Aug 30, 2022
@gabrocheleau gabrocheleau deleted the trie/remove-isTruthy-isFalsy branch August 30, 2022 14:40
@@ -657,7 +657,7 @@ export class Trie {
} as PutBatch
})

if (this.root() === this.EMPTY_TRIE_ROOT && isTruthy(opStack[0])) {
if (this.root() === this.EMPTY_TRIE_ROOT && opStack[0] !== undefined && opStack[0] !== null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but totally love all this (have taken a random line to comment 😋)!!!

This is structurally such an improvement for the whole library suite! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants